import Http from './../http/chatApiHttp'
export default class Message{
  constructor (){

  }
  sendMessage(params){
    return new Promise((resolve,reject)=> {
      Http.request({
        data: params,
        method: 'POST',
        url: 'im/sendMessage'
      }).then((res) => {
        resolve(res)
      })
    })
  }
  //获取聊天记录历史
  getHistoryMessages(params){
    return new Promise((resolve)=>{
      Http.request({
        data:params,
        method:'POST',
        url:'/im/getMsgDetail'
      }).then((res)=>{
        resolve(res.returnObj);
      })
    })
  }
}